﻿// Decompiled with JetBrains decompiler
// Type: UnityEngine.U2D.SpriteBone
// Assembly: UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: E6AE6B5A-2752-4B07-9528-C8B77C62CE79
// Assembly location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.dll
// XML documentation location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.xml

using System;
using UnityEngine.Bindings;
using UnityEngine.Scripting;
using UnityEngine.Scripting.APIUpdating;

#nullable disable
namespace UnityEngine.U2D
{
  /// <summary>
  ///   <para>Stores a set of information that describes the bind pose of this Sprite.</para>
  /// </summary>
  [NativeType(CodegenOptions.Custom, "ScriptingSpriteBone")]
  [MovedFrom("UnityEngine.Experimental.U2D")]
  [RequiredByNativeCode]
  [NativeHeader("Runtime/2D/Common/SpriteDataMarshalling.h")]
  [NativeHeader("Runtime/2D/Common/SpriteDataAccess.h")]
  [Serializable]
  public struct SpriteBone
  {
    [NativeName("name")]
    [SerializeField]
    private string m_Name;
    [NativeName("guid")]
    [SerializeField]
    private string m_Guid;
    [SerializeField]
    [NativeName("position")]
    private Vector3 m_Position;
    [SerializeField]
    [NativeName("rotation")]
    private Quaternion m_Rotation;
    [NativeName("length")]
    [SerializeField]
    private float m_Length;
    [SerializeField]
    [NativeName("parentId")]
    private int m_ParentId;
    [SerializeField]
    [NativeName("color")]
    private Color32 m_Color;

    /// <summary>
    ///   <para>The name of the bone. This is useful when recreating bone hierarchy at editor or runtime. You can also use this as a way of resolving the bone path when a Sprite is bound to a more complex or richer hierarchy.</para>
    /// </summary>
    public string name
    {
      get => this.m_Name;
      set => this.m_Name = value;
    }

    /// <summary>
    ///   <para>The Unique GUID of this bone.</para>
    /// </summary>
    public string guid
    {
      get => this.m_Guid;
      set => this.m_Guid = value;
    }

    /// <summary>
    ///   <para>The position in local space of this bone.</para>
    /// </summary>
    public Vector3 position
    {
      get => this.m_Position;
      set => this.m_Position = value;
    }

    /// <summary>
    ///   <para>The rotation of this bone in local space.</para>
    /// </summary>
    public Quaternion rotation
    {
      get => this.m_Rotation;
      set => this.m_Rotation = value;
    }

    /// <summary>
    ///   <para>The length of the bone. This is important for the leaf bones to describe their length without needing another bone as the terminal bone.</para>
    /// </summary>
    public float length
    {
      get => this.m_Length;
      set => this.m_Length = value;
    }

    /// <summary>
    ///   <para>The ID of the parent of this bone.</para>
    /// </summary>
    public int parentId
    {
      get => this.m_ParentId;
      set => this.m_ParentId = value;
    }

    /// <summary>
    ///   <para>Shows the color set for the bone in the Editor.</para>
    /// </summary>
    public Color32 color
    {
      get => this.m_Color;
      set => this.m_Color = value;
    }
  }
}
